<template>
  <UploadAvatar v-model="value" bucket="bucket1" />
</template>
<script setup lang="ts">
  import { UploadAvatar } from '@/components/upload';

  import { ref, watchEffect, watch } from 'vue'
  import { Column } from '@/seed-application/types';

  const props = defineProps<{column: Column, modelValue: any}>()
  const emit = defineEmits(['update:modelValue'])

  const value = ref(props.modelValue)

  watchEffect(() => emit('update:modelValue', value.value))
  watch(() => props.modelValue, (val) => value.value = val)
</script>
